Spread Windows Forms 7.0 Product Documentation
GenerateFromCellRanges(SheetView,CellRange[],Boolean) Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Chart Namespace > SpreadChart Class > GenerateFromCellRanges Method : GenerateFromCellRanges(SheetView,CellRange[],Boolean) Method


sheetView
The sheet view.
cellRanges
The cell ranges.
autoSwitch
if set to true, the processing will switch rows and columns automatically if necessary.

Glossary Item Box

Generates from cell ranges.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub GenerateFromCellRanges( _
   ByVal sheetView As SheetView, _
   ByVal cellRanges() As CellRange, _
   ByVal autoSwitch As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As SpreadChart
Dim sheetView As SheetView
Dim cellRanges() As CellRange
Dim autoSwitch As Boolean
 
instance.GenerateFromCellRanges(sheetView, cellRanges, autoSwitch)
C# 
public void GenerateFromCellRanges( 
   SheetView sheetView,
   CellRange[] cellRanges,
   bool autoSwitch
)

Parameters

sheetView
The sheet view.
cellRanges
The cell ranges.
autoSwitch
if set to true, the processing will switch rows and columns automatically if necessary.

Remarks

The sheetView parameter is how the cell ranges relate to the SheetView. This function can be used to rebuild a chart.

Example

This example uses the GenerateFromCellRanges method.
C#Copy Code
FarPoint.Win.Spread.Model.CellRange celRange1 = new FarPoint.Win.Spread.Model.CellRange(0, 0, 7, 2);
FarPoint.Win.Spread.Model.CellRange celRange2 = new FarPoint.Win.Spread.Model.CellRange(0, 2, 7, 2);
FarPoint.Win.Spread.Chart.SpreadChart chart = new FarPoint.Win.Spread.Chart.SpreadChart(typeof(FarPoint.Win.Chart.BarSeries));
chart.GenerateFromCellRanges(fpSpread1.Sheets[0], new FarPoint.Win.Spread.Model.CellRange[] { celRange1, celRange2 }, true);
fpSpread1.Sheets[0].Charts.Add(chart);
Visual BasicCopy Code
Dim celRange1 As New FarPoint.Win.Spread.Model.CellRange(0, 0, 7, 2)
Dim celRange2 = New FarPoint.Win.Spread.Model.CellRange(0, 2, 7, 2)
Dim chart As New FarPoint.Win.Spread.Chart.SpreadChart(GetType(FarPoint.Win.Chart.BarSeries))
chart.GenerateFromCellRanges(FpSpread1.Sheets(0), New FarPoint.Win.Spread.Model.CellRange() {celRange1, celRange2}, True)
FpSpread1.Sheets(0).Charts.Add(chart)

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.